//
//  BBUtil.h
//  BBGameLib
//
//  Created by Eric on 12/23/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"

/*----------Common--------------*/
BOOL isiPad();
BOOL isiP4();

CGFloat scaleiP3();

void alert(NSString* message, NSString* title);
void alertNoTitle(NSString* message);


/*----------Collection--------------*/
@interface NSSet(BB)
- (BOOL)containsIN:(NSInteger)aKey;
@end

@interface NSArray(BB)
- (BOOL)containsIN:(NSInteger)aKey;
@end

@interface NSMutableArray(BB)
- (void)addObjectIN:(NSInteger)aInt;
- (void)removeObjectIN:(NSInteger)aInt;
@end

@interface NSDictionary(BB)
- (double)doubleValue:(id)key defaultVal:(double)defaultVal;
- (float)floatValue:(id)key defaultVal:(float)defaultVal;
- (float)floatValueIN:(NSInteger)key defaultVal:(float)defaultVal;
- (float)floatValueIS:(NSInteger)key defaultVal:(float)defaultVal;
- (NSInteger)intValue:(id)key defaultVal:(NSInteger)defaultVal;
- (NSInteger)integerValue:(id)key defaultVal:(NSInteger)defaultVal;
- (long long)longLongValue:(id)key defaultVal:(long long)defaultVal;
- (BOOL)boolValue:(id)key defaultVal:(BOOL)defaultVal; 
- (id)value:(id)key defaultVal:(id)defaultVal;
- (BOOL)containsKeyIN:(NSInteger)aKey;
- (id)objectForKeyIN:(NSInteger)aKey;
- (id)objectForKeyIS:(NSInteger)aKey;
@end


@interface NSMutableDictionary(BB)
- (void)setObject:(id)anObject forKeyIN:(NSInteger)aKey;
- (void)setObject:(id)anObject forKeyIS:(NSInteger)aKey;
- (void)removeObjectForKeyIN:(NSInteger)aKey;
@end